Images, both still images and video images, are often referenced by a camera system and recorded in digital forms. Camera systems comprise at least one lens which focuses light from a physical scene onto an image plane, which for digital recording can be a planar array of light receptors in a charge coupled device (CCD). Image data recorded electronically (such as by a CCD) can be modified using various image processing techniques, for example, color filtering, edge detection, and noise removal.
Lenses of the cameras in the aforementioned camera systems often cause distortions from what would be recorded by an ideal pinhole camera. In the ideal pinhole camera, a point on an object in the physical scene has a corresponding image point on an image plane such that the object point, the pinhole point and the corresponding image point all lie on the same line in a three-dimensional space. Actual lenses will typically not achieve the ideal due, for example, to their finite size, refraction and manufacturing imperfections.
In order to accurately work with, add or edit images captured with distortion in a computer graphics environment, typically either a distorted computer generated is produced and added to the distorted image, or the distorted image is corrected to remove the distortion and an undistorted version of the computer graphic is added to the image. In the latter approach once the images have been processed by the animation or graphic artists (e.g., edited to add one or more graphic objects to the image), it is frequently desirable to reintroduce the lens distortion into the processed images for usage in content (e.g. feature films). For example, the edited image may represent a frame in a movie that needs to be re-distorted in order to match earlier and/or later frames in the movie that include the original distortion.
Correcting for lens distortion is typically performed using a relatively efficient lens correction algorithm. To generate lens distortion in an already corrected image, however, is typically a much more complex problem that may require a specialized solver and several orders of magnitude more computational resources than what is required for correcting for the distortion.